import java.io.IOException;
import java.util.StringTokenizer;

public class Main{

	/**
	 * @param args
	 * @throws IOException
	 */

	private static boolean isNumber(String n) {
		for (int i = 0; i < n.length(); i++) {
			if (n.charAt(i) < '0' || n.charAt(i) > '9') {
				return false;
			}
		}
		return true;
	}

	public static void main(String[] args) throws IOException {
		java.io.BufferedReader r = new java.io.BufferedReader(
				new java.io.InputStreamReader(System.in));

		int number = Integer.parseInt(r.readLine());
		for (int i1 = 0; i1 < number; i1++) {
			r.readLine();
			String s = r.readLine();
			StringTokenizer tokenizer = new StringTokenizer(s, "+= ");
			String a = tokenizer.nextToken();
			String b = tokenizer.nextToken();
			String c = tokenizer.nextToken();

			if (!isNumber(a)) {
				a = "" + (Long.parseLong(c) - Long.parseLong(b));
			}

			if (!isNumber(b)) {
				b = "" + (Long.parseLong(c) - Long.parseLong(a));
			}

			if (!isNumber(c)) {
				c = "" + (Long.parseLong(a) + Long.parseLong(b));
			}

			System.out.println(a + " + " + b + " = " + c);

		}
	}
}
